//package com.example.phonelightning.ui.permissionguide
//
//import android.app.Dialog
//import android.content.Context
//import android.graphics.Color
//import android.graphics.drawable.ColorDrawable
//import android.os.Bundle
//import android.widget.Button
//import android.widget.TextView
//import com.dotools.umlibrary.UMPostUtils
//import com.example.phonelightning.R
//import com.example.phonelightning.utils.PermissionUtils
//
//open class GuideTaskLockDialog(context: Context, callback: DialogCallBack?) : Dialog(context) {
//    var callback: DialogCallBack? = null
//
//    init {
//        this.callback = callback
//    }
//
//    override fun onCreate(savedInstanceState: Bundle?) {
//        super.onCreate(savedInstanceState)
//        val window = window
//        window!!.setBackgroundDrawable(ColorDrawable(Color.TRANSPARENT))
//        setContentView(R.layout.dialog_guide_task_lock)
//        setCanceledOnTouchOutside(false)
//
//        when {
//            //TODO
//            PermissionUtils.isVivoDevice() || PermissionUtils.isHuaWeiDevice() -> {
//                findViewById<TextView>(R.id.txt_content).text = "为了进一步提升闹钟稳定性，请锁定后台 \n 菜单中下拉应用锁定后台"
////                img_help.setImageResource(R.drawable.huawei_lock)
//            }
//            PermissionUtils.isOppoDevice() -> {
//                findViewById<TextView>(R.id.txt_content).text = "为了进一步提升闹钟稳定性，请锁定后台 \n 点击右上角，再点击锁定"
////                img_help.setImageResource(R.drawable.oppo_lock)
//            }
//            PermissionUtils.isXiaomiDevice() -> {
//                findViewById<TextView>(R.id.txt_content).text = "为了进一步提升闹钟稳定性，请锁定后台 \n 长按菜单中应用，点击锁定"
////                img_help.setImageResource(R.drawable.xiaomi_lock)
//            }
//        }
//
//        findViewById<Button>(R.id.btn_start).setOnClickListener {
//            UMPostUtils.onEvent(context, "lock_ok_click")
//            callback?.onOk()
//            dismiss()
//        }
//    }
//
//    interface DialogCallBack {
//        fun onOk()
//    }
//
//}